﻿
using JiveMessenger.Models;
using JiveMessenger.ViewModels;
using JmShared;
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using WinampLib;

namespace JiveMessenger.User
{
    public enum PrivateMessageBehavior
    {
        Tabs = 0,
        Windows = 1,
        Both = 2
    }
    public interface IClient
    {
        JariZ.SpotifyAPI SpotifyApi { get; set; }
        string LastConnectedUserName { get; set; }
        bool IsAfk { get; set; }
        bool IsBusy { get; set; }
        bool IsLoggedIn { get; set; }
        bool ValidateEmoticonShortcut(string str, out string error);
        bool ValidateEmoticonShortcut(string str, string exludeShortcut, out string error);
        bool IsUserConnecting { get; set; }
        bool IsRetrying { get; set; }
        int MessageID { get; set; }
        bool StopReconnectRetrying { get; set; }
        JmShared.PcUserSettings UserSettings { get; set; }
        ConcurrentDictionary<string, JmShared.UserInfo> ContactClients { get; set; }
        List<string> FriendUsernames { get; set; }
        ConcurrentDictionary<string, ViewModelChatWindow> OpenWindowViewModels { get; set; }
        ConcurrentDictionary<string, ViewModelChat> ClosedConversations { get; set; }
        ObservableCollection<JiveDefaultEmoticonModel> DefaultEmoticons { get; set; }
        JiveMessenger.Network.NetworkConnection Connection { get; set; }
        JmShared.UserInfo CurrentUserInfo { get;}
        PrivateMessageBehavior PrivateMessageBehavior { get;}

        void AcknowledgeSendtMessageReceipt(int id);
        void ClearConnectedClients();
        System.Collections.Generic.Dictionary<string, IEmoticon> GetEmoticons(string userID, bool includeDefault, bool includeCustom,bool includeLineAndSpacer);
        void InitSpotifyApi();
        void PlayNewMessageSound();
        void PlayNudgeSound();
        void DownloadApplicationUpdate(string downloadUrl);
        void SkipUpdateVersion(string version);
        void SaveAvatarToDisk(UserInfo senderUser, byte[] data, string hash, string extension);
        void Cleanup();
        void ChangeManualClientStatus(ClientStatus status);
        void StartConnectTask(bool isAutoLogin);
        void StartReconnectTask();
        void OpenNewPM(string userID);
        void StopReconnectTask();
        string GetSpotifyNowPlayingText();
        Tuple<string, TrackInfo> GetWinampNowPlayingText();
    }
}
